<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <script src="/js/resize.js"></script>
    <% include baiduTJ.html %>
    <link rel="stylesheet" href="/css/myreset.min.css">
    <link rel="stylesheet" href="/css/animate.css">
    <link rel="stylesheet" href="/main/css/cart.css">
    <title><%= title %></title>
</head>
<body>
<div class="outer">
    <div class="container <%= (jd5 == '0' && jd30 == '0' && lxx == '0') ? 'no-prize' : 'has-prize' %>" id="container">
        <div class="buycart animated fadeInRightBig <%= 'b-' + buy_cart %>"></div>
        <div class="rule"></div>

        <div class="word  <%= (jd5 == '0' && jd30 == '0' && lxx == '0') ? 'hide' : '' %>">
            <div>你的好礼
                <% if (prize_arr[0]) { %>
                - <span><%= prize_arr[0] %></span>
                <% } %>
            </div>
            <div>
                <% if (prize_arr[1]) { %>
                - <span><%= prize_arr[1] %></span>
                <% } %>
                <% if (prize_arr[2]) { %>
                - <span><%= prize_arr[2] %></span>
                <% } %>
            </div>
            <div>已经被解封,快点击你要的礼物领取吧!</div>
        </div>


        <div class="jd-5 <%= jd5 == '0' ? 'hidden' : '' %> <%= prize_get['1'] == 1 ? 'disabled' : '' %>" data-id="1"></div>
        <div class="jd-30  <%= jd30 == '0' ? 'hidden' : '' %> <%= prize_get['2'] == 1 ? 'disabled' : '' %>" data-id="2"></div>
        <div class="lxx  <%= lxx == '0' ? 'hidden' : '' %> <%= prize_get['3'] == 1 ? 'disabled' : '' %>" data-id="3"></div>


        <div class="z-1 zan">
            <div class="num"><span><%= zan['1'].num %></span></div>
            <div class="info"><span><%= zan['1'].num %>/<%= zan['1'].all %></span></div>
        </div>
        <div class="z-2 zan">
            <div class="num"><span><%= zan['2'].num %></span></div>
            <div class="info"><span><%= zan['2'].num %>/<%= zan['2'].all %></span></div>
        </div>
        <div class="z-3 zan">
            <div class="num"><span><%= zan['3'].num %></span></div>
            <div class="info"><span><%= zan['3'].num %>/<%= zan['3'].all %></span></div>
        </div>

        <div class="next <%= (jd5 == '0' && jd30 == '0' && lxx == '0') ? 'disabled' : '' %>"></div>
        <div class="click-area"></div>
    </div>
</div>
<script src="/js/zepto.1.1.6.min.js"></script>
<script src="/js/base.2.0.js"></script>
<script src="/js/jweixin-1.0.0.js"></script>
<script src="/js/weixin.js"></script>
<% include wxshare.html %>
<% include music.html %>
<script>
    $(function () {
        var dh = $(window).height();
        var ch = $("#container").height();
        if (ch > dh) {
            var ro = dh / ch;
            $(".outer").css({
                "font-size": ro + "rem"
            });
        }
    })
</script>

<script>
    $(".jd-5,.jd-30,.lxx").on("tap", function () {
        if ($(this).hasClass("disabled")) {
            alert("此商品您已经提交过用户信息");
            return;
        }


        $(this).toggleClass("selected");
    });

    $(".next").on("tap", function () {
        if ($(this).hasClass("disabled")) return;

        var select_arr = [];
        for (var i = 0; i < $(".selected").length; i++) {
            select_arr.push($(".selected").eq(i).data("id"));
        }

        if (select_arr.length == 0) {
            return alert("请至少选择一个奖品");
        }

        playBtn(function () {
            window.location.href = "/index/contact?prize=" + select_arr.join(",") + "&openid=" + getQueryString("openid");
        });
        return false;
    });
    $(".rule").on("tap", function () {
        playBtn(function () {
            window.location.href = "/index/rule?openid=" + getQueryString("openid");
        });
    })

    $(".click-area").on("tap", function () {
        window.location.href = "http://scb.helloshineshow.com/pl-card/index.html?pid=WechatCart";
        return false;
    });
</script>
</body>
</html>